import QtQuick 2.0
import  QtQuick.Particles 2.0

Rectangle {
    id: root
    width: 480; height: 240
    color: "#1F1F1F"

    ParticleSystem {
        id: particleSystem
    }

    ImageParticle {
        source: "assets/star.png"
        system: particleSystem
        color: '#FFD700'
        colorVariation: 0.2
        rotation: 0
        rotationVariation: 45
        rotationVelocity: 15
        rotationVelocityVariation: 15
        entryEffect: ImageParticle.Scale
    }

    Emitter{
        id: emitter
        anchors.left: parent.left
        anchors.verticalCenter: parent.verticalCenter
        width: 1; height: 1
        system: particleSystem
        lifeSpan: 6400
        lifeSpanVariation: 400
        size: 32
        velocity:AngleDirection{  //velocity 速度
            angle: 0
            angleVariation: 15  //角度变化
            magnitude: 100    //梯度值
            magnitudeVariation: 50  //梯度值的变化
        }
    }
    Emitter{
        id: emitter1
        anchors.right: parent.right
        x:0 ; y :15
        anchors.verticalCenter: parent.verticalCenter
        width: 1; height: 1
        system: particleSystem
        lifeSpan: 6400
        lifeSpanVariation: 400
        size: 32
        velocity:AngleDirection{  //velocity 速度
            angle: 180
            angleVariation: 15  //角度变化
            magnitude: 100    //梯度值
            magnitudeVariation: 50
        }
    }

}
